Code Reuse With Transformation Objects
نویسنده
چکیده
We present an approach for a lightweight datatype-generic programming in Objective Caml programming language aimed at better code reuse. We show that a large class of transformations usually expressed via recursive functions with pattern matching can be implemented using the single per-type traversal function and the set of objectencoded transformations, which we call transformation objects. Object encoding allows transformations to be modified, inherited and extended in a conventional object-oriented manner. However, the data representation is kept untouched which preserves the ability to construct and pattern-match it in the usual way. Our approach equally works for regular and polymorphic variant types [1] which makes it possible to combine data types and their transformations from statically typed and separately compiled components. We also present an implementation which allows to automatically derive most functionality from a slightly augmented type descriptions.
منابع مشابه
Dwarf Frankenstein is still in your memory: tiny code reuse attacks
Code reuse attacks such as return oriented programming and jump oriented programming are the most popular exploitation methods among attackers. A large number of practical and non-practical defenses are proposed that differ in their overhead, the source code requirement, detection rate and implementation dependencies. However, a usual aspect among these methods is consideration of the common be...
متن کاملContext-Aware Generative Learning Objects for Teaching Computer Science*
The paper introduces context-awareGenerative LearningObjects (GLOs) to supportwide-scale reusability and automatic adaptability in teaching Computer Science (CS) topics. We introduce the theoretical background of the approach to support adaptation through transformations based on the principles of Design-for-Reuse and Design-with-Reuse, which are well known in Software Engineering (SWE), and va...
متن کاملThe Reduction Process for Change Type Cases to Consider
Pragmatic reuse tasks can be validated by a custom record-and-replay (R&R) technique that transforms automated test suites to focus on the reused code, reducing the need to develop test suites manually; this technique has previously been reified in the Skipper tool. In general, R&R test suites have been criticized as lacking maintainability when the source under test evolves, but the literature...
متن کاملAggrandizing the beast's limbs: patulous code reuse attack on ARM architecture
Since smartphones are usually personal devices full of private information, they are a popular target for a vast variety of real-world attacks such as Code Reuse Attack (CRA). CRAs enable attackers to execute any arbitrary algorithm on a device without injecting an executable code. Since the standard platform for mobile devices is ARM architecture, we concentrate on available ARM-based CRAs. Cu...
متن کاملDeterministic Multithreading for Java-based Replicated Objects
This paper describes a novel approach to deterministic multithreading for active replication of Java objects. Unlike other existing approaches, the presented deterministic thread scheduler fully supports the native Java synchronisation mechanisms, including reentrant locks, condition variables, and time bounds on wait operations. Furthermore, this paper proposes source-code transformation as a ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1802.01930 شماره
صفحات -
تاریخ انتشار 2018